﻿namespace Cubicle.Core.Processors
{
    public abstract class ConditionalProcessor<T> : Processor<T>
    {
        public abstract bool Condition(T input);

        public override T Process(T input) 
        {
            return Condition(input) 
                ? ConditionalProcess(input) 
                : input;
        }

        public abstract T ConditionalProcess(T input);
    }
}
